<template>
<div class="CenterContainer">
  <div class="center">
    <div class="flex">
      <!--    左-->
      <el-space direction="vertical" :size="1">
        <el-card class="box-card">
          <div class="grid-content ep-bg-purple">
            <div v-if="!ava" class="userAva">
              <el-avatar  :icon="UserFilled" :size="100"/>
            </div>
            <div v-else>
              <el-avatar
                  :src="ava"
                  :size="100"
              />
            </div>
            <div>
              <p>用户姓名</p>
              <el-button size="small" class="btn"><i></i><i></i></el-button>
            </div>
            <div class="fans">
              <div>
                <p>0</p>
                <span>关注</span>
              </div>
              <div>
                <p>0</p>
                <span>粉丝</span>
              </div>
            </div>
          </div>

        </el-card>
        <el-card class="box-card">
          <span>资源动态</span>
        </el-card>
        <el-card class="box-card list">
          <p>资源动态</p>
          <p>资源动态</p>
          <p>资源动态</p>
          <p>资源动态</p>
          <p>资源动态</p>
        </el-card>
        <el-card class="box-card">
          <span>资源动态</span>
        </el-card>
      </el-space>
      <!--    右-->
      <el-space direction="vertical" class="right">
        <el-card class="box-card" >
          <span>资源动态</span>
        </el-card>
        <el-card class="box-card rightCard" >
          <router-view/>
        </el-card>
      </el-space>
    </div>
  </div>
</div>
</template>

<script lang="ts">
import {defineComponent} from "vue";

export default defineComponent({
  name: "Center",
});

</script>

<script lang="ts" setup>
import { UserFilled } from '@element-plus/icons-vue'
const ava = 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png'
import {useRouter} from "vue-router";
import {onMounted} from "vue";
const $router = useRouter()
onMounted(()=>{
  console.log($router)
})
</script>

<style lang="scss" scoped>
.CenterContainer{
  width: 100%;
  background-color: #f5f7f9;
}
.center{
  width: 1200px;
  margin: 0px auto;
  padding-top: 20px;
  .flex{
    display: flex;
    justify-content:space-between
  }
}
.box-card{
  margin: 5px 10px;
  background-color: #ffffff;
  width: 160px;
  border-radius: 4px;
  .grid-content{
    .userAva{
      text-align: center;
    }
    div{
      text-align: center;
      .btn{
        background: linear-gradient(#ff289b,#ff43d0);
        color: #f9f9f9;
        border-radius: 4px;
        padding-left: 8px;
        :nth-of-type(1){
          width: 15px;
          height: 10px;
          background-image: url(https://rs.dance365.com/level_Lv.@3x.png);
          display: inline-block;
          background-size: 100%;
          background-repeat: no-repeat;
        }
        :nth-of-type(2){
          width: 8px;
          height: 10px;
          display: inline-block;
          background-size: 100%;
          background-repeat: no-repeat;
          background-image: url(https://rs.dance365.com/level_num_1@3x.png);
        }
      }
    }
    .fans{
      display: flex;
      justify-content: center;
      div{
        margin: 0 10px;
        margin-top:20px;
      }
    }
  }
}
.list{
  :nth-of-type(1){
    margin-top: -5px;
  }
  :last-child{
    margin-bottom: -5px;
  }
  p{
    margin: 5px 0;
    height: 40px;
    line-height: 40px;
  }
}
.right{
  margin-bottom: 80px;
  .box-card{
    width: 1000px;
  }
  .rightCard{
    height: 800px;
  }
}

</style>
